﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;

public class UnitDataSystem : JobComponentSystem
{
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {/*
        float dt = Time.DeltaTime;*/
        JobHandle jbh = Entities.ForEach((ref UnitDataComponent unitData) =>
        {
            unitData.Level += math.exp10(math.sqrt(unitData.Level));
        }).Schedule(inputDeps);
        return jbh;
    }

    /*    protected override void OnUpdate()
        {
            Entities.ForEach((ref UnitDataComponent unitData) =>
            {
                unitData.Level += math.exp10(math.sqrt(unitData.Level));
            });
        }*/
}
